package com.codejam.hello.world.anno.check.odd;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 是奇数
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD})
@Constraint(validatedBy = OddCheck.class)
public @interface IsOdd {

    String message() default "is not odd";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
